<?php
/**
 * Created by yuxianjun001@icloud.com.
 * User: wuchen
 * Date: 2019/4/1
 * Time: 10:54
 */

namespace App\Http\Controllers\Api\Goods;

use App\Services\Goods\BusinessGoodsService;
use Illuminate\Http\Request;
use App\Http\Controllers\Common\MyController;

/**
 * 商家后端-商品模块
 * Class BusinessGoods
 * @package App\Http\Controllers\Api\Goods
 */
class BusinessGoodsController  extends MyController
{

    private $service;

    public function __construct()
    {
        $this->service = new BusinessGoodsService();
    }


    /**
     * 商品列表
     * @param Request $request
     * @return mixed
     */
    public function list(Request $request)
    {
        return $this->service->list($request);

    }
    /**
     * 查看商品详情
     * @param Request $request
     */
    public function info(Request $request)
    {
        return $this->service->info($request);
    }

    /**
     * 商家商品上下架
     * @param Request $request
     */
    public function upAndDown(Request $request)
    {
        return $this->service->upAndDown($request);
    }

    /**
     * 申请促销
     * @param Request $request
     */
    public function promotion(Request $request)
    {
        return $this->service->promotion($request);
    }

    /**
     * 上下移动排序
     * @param Request $request
     */
    public function sort(Request $request)
    {
        return $this->service->sort($request);
    }


}